import request from '../request'

// 登录
function loginApi( data ){
  return request({
    url: '/api/login',
    method: 'post',
    data
  })
}

// 获取用户信息
function getUserInfoApi(){
  return request({
    url: '/api/userInfo'
  })
}

// 注册
function registerApi( data ){
  return request({
    url: '/api/register',
    method: 'post',
    data
  })
}

// 修改用户信息
function editUserApi( data ){
  return request({
    url: '/api/EditUser',
    method: 'post',
    data
  })
}

const result = {
  loginApi,
  getUserInfoApi,
  registerApi,
  editUserApi
}

export default result;